#ifndef __GAMELAYER_H__
#define __GAMELAYER_H__

#include "SceneController.h"
#include "stdlib.h"
#include "time.h"
//#include "Box.h"
//#include "IndexBox.h"

using namespace cocos2d;
using namespace CocosDenshion;

class Box;
class IndexBox;

class GameLayer : public CCLayer
{
public:

	CCSize winSize;
	Box* box[30];
	IndexBox* indexBox;
	CCLabelTTF *lblScore;
	CCString* returnRec;
	int idxColorId;
	int recNumber;
	int count;
	int counter0;
	int counter1;
	int counter2;
	int counter3;
	int counter4;

	//int random_width[20];
	//int random_height[20];
	//int sum_width;
	//int sum_height;
	
	virtual bool init();  
	void update(float dt);
	void ccTouchesBegan(CCSet *pTouches, CCEvent *pEvent);
	void ccTouchesMoved(CCSet *pTouches, CCEvent *pEvent);
	void ccTouchesEnded(CCSet *pTouches, CCEvent *pEvent);
	void changeColor();
	void changIdxColor();
	int checkColorId(int colorId);
	int randomId();
	int recRandomId();
	CCString* getChangeColor(int randomId);


    CREATE_FUNC(GameLayer);
};

#endif // __GAMELAYER_H__
